// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_ACCOUNTING_VOUCHER
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinAccountingVoucherEntity : EntityBase
    {
        public FinAccountingVoucherTable TableSchema
        {
            get
            {
                return FinAccountingVoucherTable.Current;
            }
		}
		
		public FinAccountingVoucherEntity()
        {

        }
		
		public FinAccountingVoucherEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.VoucherId = Convert.ToString(CommonFunctions.ToObject(dr["VOUCHER_ID"]));
			this.AccountingDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ACCOUNTING_DATE"]));
			this.VoucherNo = Convert.ToString(CommonFunctions.ToObject(dr["VOUCHER_NO"]));
			this.TotalDebitAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_DEBIT_AMOUNT"]));
            this.TotalCreditAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_CREDIT_AMOUNT"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public FinAccountingVoucherEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.VoucherId = Convert.ToString(CommonFunctions.ToObject(dr["VOUCHER_ID"]));
			this.AccountingDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ACCOUNTING_DATE"]));
			this.VoucherNo = Convert.ToString(CommonFunctions.ToObject(dr["VOUCHER_NO"]));
			this.TotalDebitAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_DEBIT_AMOUNT"]));
            this.TotalCreditAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_CREDIT_AMOUNT"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinAccountingVoucherTable.Current;
            }
        }
		
		#region Perporty List
        public string VoucherId
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherTable.C_VOUCHER_ID)); }
            set { SetData(FinAccountingVoucherTable.C_VOUCHER_ID, value); }
        }
		
        public DateTime AccountingDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountingVoucherTable.C_ACCOUNTING_DATE)); }
            set { SetData(FinAccountingVoucherTable.C_ACCOUNTING_DATE, value); }
        }
		
        public string VoucherNo
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherTable.C_VOUCHER_NO)); }
            set { SetData(FinAccountingVoucherTable.C_VOUCHER_NO, value); }
        }
		
        public decimal TotalDebitAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountingVoucherTable.C_TOTAL_DEBIT_AMOUNT)); }
            set { SetData(FinAccountingVoucherTable.C_TOTAL_DEBIT_AMOUNT, value); }
        }

        public decimal TotalCreditAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountingVoucherTable.C_TOTAL_CREDIT_AMOUNT)); }
            set { SetData(FinAccountingVoucherTable.C_TOTAL_CREDIT_AMOUNT, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherTable.C_CREATED_BY)); }
            set { SetData(FinAccountingVoucherTable.C_CREATED_BY, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountingVoucherTable.C_CREATED_DATE)); }
            set { SetData(FinAccountingVoucherTable.C_CREATED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherTable.C_LAST_MODIFIED_BY)); }
            set { SetData(FinAccountingVoucherTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountingVoucherTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(FinAccountingVoucherTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherTable.C_APPROVED_BY)); }
            set { SetData(FinAccountingVoucherTable.C_APPROVED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountingVoucherTable.C_APPROVED_DATE)); }
            set { SetData(FinAccountingVoucherTable.C_APPROVED_DATE, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherTable.C_STATUS)); }
            set { SetData(FinAccountingVoucherTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

